Dynamic adjustment of read voltage levels based on memory cell threshold voltage distribution

ABSTRACT

A system and methods to find the threshold voltage distribution across a set of nonvolatile memory cells, such that embodiments may incorporate this distribution information into calculations that may change the read compare voltages used to read the memory cells, while ensuring adequate separation in read voltage between different data states at which the memory cells may be read.

BACKGROUND OF THE INVENTION

Semiconductor memory has become more popular for use in variouselectronic devices. For example, non-volatile semiconductor memory isused in cellular telephones, digital cameras, personal digitalassistants, mobile computing devices, non-mobile computing devices andother devices. Electrical Erasable Programmable Read Only Memory(EEPROM) and flash memory are among the most popular non-volatilesemiconductor memories.

Both EEPROM and flash memory utilize a floating gate that is positionedabove and insulated from a channel region in a semiconductor substrate.The floating gate and channel regions are positioned between the sourceand drain regions. A control gate is provided over and insulated fromthe floating gate. The threshold voltage of the transistor is controlledby the amount of charge that is retained on the floating gate. That is,the minimum amount of voltage that must be applied to the control gatebefore the transistor is turned on to permit conduction between itssource and drain is controlled by the level of charge on the floatinggate.

When programming an EEPROM or flash memory device, such as a NAND flashmemory device, typically a program voltage is applied to the controlgate and the bit line is grounded. Electrons from the channel areinjected into the floating gate. When electrons accumulate in thefloating gate, the floating gate becomes negatively charged and thethreshold voltage of the memory cell is raised so that the memory cellis in a programmed state. More information about programming can befound in U.S. Pat. No. 6,859,397, titled “Source Side Self BoostingTechnique for Non-Volatile Memory;” U.S. Pat. No. 6,917,542, titled“Detecting Over Programmed Memory;” and U.S. Pat. No. 6,888,758, titled“Programming Non-Volatile Memory,” all three cited patents areincorporated herein by reference in their entirety.

In many cases, the program voltage is applied to the control gate as aseries of pulses (referred to as programming pulses), with the magnitudeof the pulses increasing at each pulse. Between programming pulses, aset of one or more verify operations are performed to determine whetherthe memory cell(s) being programmed have reached their target level. Ifa memory cell has reached its target level, programming stops for thatmemory cell. If a memory cell has not reached its target level,programming will continue for that memory cell.

Some EEPROM and flash memory devices have a floating gate that is usedto store two ranges of charges and, therefore, the memory cell can beprogrammed/erased between two states (an erased state and a programmedstate). Such a flash memory device is sometimes referred to as a binarymemory device.

A multi-state memory device stores multiple bits of data per memory cellby identifying more than two distinct valid threshold voltagedistributions (or data states) separated by forbidden ranges. Eachdistinct threshold voltage distribution corresponds to a predeterminedvalue for the set of data bits encoded in the memory device. Forexample, a memory cell that stores two bits of data uses four validthreshold voltage distributions. A memory cell that stores three bits ofdata uses eight valid threshold voltage distributions.

Although non-volatile memory has proven to be very reliable, sometimeserrors can occur. Many memory systems uses Error Correction Codes (ECC)to correct errors found during a read process. Sometimes, however, ECCcannot correct all errors.

Sometimes, because of thermal effects from the environment or capacitivecoupling from neighboring memory cells, electrons may be added to orremoved from the floating gate of a memory cell. As a consequence, thedistribution of the threshold voltages of a large set of memory cellsmay change, which can result in errors when reading the data.

DESCRIPTION OF THE DRAWINGS

FIG. 1 is a top view of a NAND string.

FIG. 2 is an equivalent circuit diagram of the NAND string.

FIG. 3 is a block diagram of a non-volatile memory system.

FIG. 4 is a block diagram depicting one embodiment of a memory array.

FIG. 5 is a block diagram depicting one embodiment of a sense block.

FIG. 6 depicts an example set of threshold voltage distributions anddepicts an example programming process.

FIG. 7 depicts an example set of threshold voltage distributions anddepicts an example programming process.

FIGS. 8A-8C depict examples of threshold voltage distributions and anexample programming process.

FIG. 9 is a table showing one example of a relationship betweenthreshold voltage distributions and data stored in memory cells.

FIG. 10 is a flow chart describing one embodiment of a process foroperating non-volatile storage.

FIG. 11 is a flow chart describing one embodiment of a process forprogramming non-volatile storage.

FIG. 12 is a flow chart describing one embodiment of a process forperforming programming operations for non-volatile storage.

FIG. 13 is a flow chart describing a one embodiment of a process forreading non-volatile storage.

FIG. 14 is a flow chart showing a process by which the system obtainsthe distribution of memory cells given a fixed read compare voltage.

FIG. 15 is a flow chart describing one embodiment of a process forreading the upper page on a memory cell.

FIG. 16 is a flow chart describing one embodiment of a process forreading the lower page on a memory cell.

FIG. 17 is a flow chart describing one embodiment of a process for usingdata from memory cell reads in order to determine the distribution ofcells among the various possible states.

FIG. 18 is a graph depicting an exemplary distribution of the number ofmemory cells whose threshold voltages fall within a set of specifiedvoltage ranges.

FIG. 18A is a graph of threshold voltage distribution data.

FIG. 18 is a graph showing the result of a derivative calculation.

FIG. 18C is a flow chart that describes one embodiment of a process forupdating read compare levels.

FIG. 19 is a flow chart describing one embodiment of a process performedfor updating a non-volatile memory system during idle time.

FIG. 19A is a flow chart describing one embodiment of a process toperiodically adjust read compare voltages for nonvolatile memoryelements.

DETAILED DESCRIPTION

The following description applies to a system and methods to measure thethreshold voltage distribution of a set of nonvolatile memory cells. Thesystem can then adjust the read compare voltages used to read the memorycells in order to account for drift in the threshold voltagedistribution. Embodiments will now be described with reference to thedrawings enclosed with this document.

One example of a non-volatile storage system that can be used toimplement the technology described herein is a flash memory system thatuses the NAND structure, which includes arranging multiple transistorsin series, sandwiched between two select gates. The transistors inseries and the select gates are referred to as a NAND string. FIG. 1 isa top view showing one NAND string. FIG. 2 is an equivalent circuitthereof. The NAND string depicted in FIGS. 1 and 2 includes fourtransistors 100, 102, 104 and 106 in series and sandwiched between afirst (drain side) select gate 120 and a second (source side) selectgate 122. Select gate 120 connects the NAND string to a bit line via bitline contact 126. Select gate 122 connects the NAND string to sourceline 128. Select gate 120 is controlled by applying the appropriatevoltages to select line SGD. Select gate 122 is controlled by applyingthe appropriate voltages to select line SGS. Each of the transistors100, 102, 104 and 106 has a control gate and a floating gate. Forexample, transistor 100 has control gate 100CG and floating gate 100FG.Transistor 102 includes control gate 102CG and a floating gate 102FG.Transistor 104 includes control gate 104CG and floating gate 104FG.Transistor 106 includes a control gate 106CG and a floating gate 106FG.Control gate 100CG is connected to word line WL3, control gate 102CG isconnected to word line WL2, control gate 104CG is connected to word lineWL1, and control gate 106CG is connected to word line WL0.

Note that although FIGS. 1 and 2 show four memory cells in the NANDstring, the use of four memory cells is only provided as an example. ANAND string can have less than four memory cells or more than fourmemory cells. For example, some NAND strings will include eight memorycells, 16 memory cells, 32 memory cells, 64 memory cells, 128 memorycells, etc. The discussion herein is not limited to any particularnumber of memory cells in a NAND string. One embodiment uses NANDstrings with 66 memory cells, where 64 memory cells are used to storedata and two of the memory cells are referred to as dummy memory cellsbecause they do not store data.

A typical architecture for a flash memory system using a NAND structurewill include several NAND strings. Each NAND string is connected to thecommon source line by its source select gate controlled by select lineSGS and connected to its associated bit line by its drain select gatecontrolled by select line SGD. Each bit line and the respective NANDstring(s) that are connected to that bit line via a bit line contactcomprise the columns of the array of memory cells. Bit lines are sharedwith multiple NAND strings. Typically, the bit line runs on top of theNAND strings in a direction perpendicular to the word lines and isconnected to a sense amplifier.

Relevant examples of NAND type flash memories and their operation areprovided in the following U.S. patents/patent applications, all of whichare incorporated herein by reference: U.S. Pat. No. 5,570,315; U.S. Pat.No. 5,774,397; U.S. Pat. No. 6,046,935; U.S. Pat. No. 6,456,528; andU.S. Pat. Publication No. US2003/0002348.

Other types of non-volatile storage devices, in addition to NAND flashmemory, can also be used. For example, non-volatile memory devices arealso manufactured from memory cells that use a dielectric layer forstoring charge. Instead of the conductive floating gate elementsdescribed earlier, a dielectric layer is used. Such memory devicesutilizing dielectric storage element have been described by Eitan etal., “NROM: A Novel Localized Trapping, 2-Bit Nonvolatile Memory Cell,”IEEE Electron Device Letters, vol. 21, no. 11, November 2000, pp.543-545. An ONO dielectric layer extends across the channel betweensource and drain diffusions. The charge for one data bit is localized inthe dielectric layer adjacent to the drain, and the charge for the otherdata bit is localized in the dielectric layer adjacent to the source.U.S. Pat. Nos. 5,768,192 and 6,011,725 disclose a non-volatile memorycell having a trapping dielectric sandwiched between two silicon dioxidelayers. Multi-state data storage is implemented by separately readingthe binary states of the spatially separated charge storage regionswithin the dielectric. Non-volatile storage based on MONOS or TANOStypes of structures or nanocrystals can also be used. Other types ofnon-volatile storage can also be used.

FIG. 3 illustrates a memory device 210 having read/write circuits forreading and programming a page (or other unit) of memory cells (e.g.,NAND multi-state flash memory) in parallel. Memory device 210 mayinclude one or more memory die or chips 212. Memory die (or integratedcircuit) 212 includes an array (two-dimensional or three dimensional) ofmemory cells 200, control circuitry 220, and read/write circuits 230Aand 230B. In one embodiment, access to the memory array 200 by thevarious peripheral circuits is implemented in a symmetric fashion, onopposite sides of the array, so that the densities of access lines andcircuitry on each side are reduced by half. The read/write circuits 230Aand 230B include multiple sense blocks 300 which allow a page of memorycells to be read or programmed in parallel. The memory array 200 isaddressable by word lines via row decoders 240A and 240B and by bitlines via column decoders 242A and 242B. Word lines and bit lines areexamples of control lines. In a typical embodiment, a controller 244 isincluded in the same memory device 210 (e.g., a removable storage cardor package) as the one or more memory die 212. Commands and data aretransferred between the host and controller 244 via lines 232 andbetween the controller and the one or more memory die 212 via lines 234.

Control circuitry 220 cooperates with the read/write circuits 230A and230B to perform memory operations on the memory array 200. The controlcircuitry 220 includes a state machine 222, an on-chip address decoder224, and a power control module 226. The state machine 222 provideschip-level control of memory operations. The on-chip address decoder 224provides an address interface between that used by the host or a memorycontroller to the hardware address used by the decoders 240A, 240B,242A, and 242B. The power control module 226 controls the power andvoltages supplied to the word lines and bit lines during memoryoperations. In one embodiment, power control module 226 includes one ormore charge pumps that can create voltages larger than the supplyvoltage. Control circuitry 220 provides address lines ADDR to rowdecoders 240A and 204B, as well as column decoders 242A and 242B. Columndecoders 242A and 242B provide data to controller 244 via the signallines marked Data I/O. Temperature sensor 228 can be an analog ordigital temperature sensor known in the art.

In one embodiment, controller 244 is implemented on a different die (orintegrated circuit) than memory chip 212. In some embodiments, thecontroller 244 interfaces with the Host and with control circuitry 220as well as the decoders. In some embodiments, controller 244 interfaceswith the read/write circuits.

In one embodiment, one or any combination of control circuitry 220,power control circuit 226, decoder circuit 224, state machine circuit222, decoder circuit 242A, decoder circuit 242B, decoder circuit 240A,decoder circuit 240B, read/write circuits 230A, read/write circuits230B, and/or controller 244 can be referred to as one or more managingcircuits. The one or more managing circuits perform the processesdescribed herein.

FIG. 4 depicts an exemplary structure of memory cell array 200. In oneembodiment, the array of memory cells is divided into a large number ofblocks (e.g., blocks 0-1023, or another amount of blocks) of memorycells. As is common for flash memory systems, the block is the unit oferase. That is, each block contains the minimum number of memory cellsthat are erased together. Other units of erase can also be used.

A block contains a set of NAND strings which are accessed via bit lines(e.g., bit lines BL0-BL69,623) and word lines (WL0, WL1, WL2, WL3). FIG.4 shows four memory cells connected in series to form a NAND string.Although four cells are shown to be included in each NAND string, moreor less than four can be used (e.g., 16, 32, 64, 128 or another numberor memory cells can be on a NAND string). One terminal of the NANDstring is connected to a corresponding bit line via a drain select gate(connected to select gate drain line SGD), and another terminal isconnected to the source line via a source select gate (connected toselect gate source line SGS).

Each block is typically divided into a number of pages. In oneembodiment, a page is a unit of programming. Other units of programmingcan also be used. One or more pages of data are typically stored in onerow of memory cells. For example, one or more pages of data may bestored in memory cells connected to a common word line. A page can storeone or more sectors. A sector includes user data and overhead data (alsocalled system data). A sector of user data is typically 512 bytes,corresponding to the size of a sector in magnetic disk drives. A largenumber of pages form a block, anywhere from 8 pages, for example, up to32, 64, 128 or more pages. Different sized blocks, pages and sectors canalso be used. Additionally, a block can have more or less than 69,624bit lines.

FIG. 5 is a block diagram of an individual sense block 300 partitionedinto a core portion, referred to as a sense module 480, and a commonportion 490. In one embodiment, there will be a separate sense module480 for each bit line and one common portion 490 for a set of multiplesense modules 480. In one example, a sense block will include one commonportion 490 and eight sense modules 480. Each of the sense modules in agroup will communicate with the associated common portion via a data bus472. One example can be found in U.S. Patent Application Publication2006/0140007, which is incorporated herein by reference in its entirety.

Sense module 480 comprises sense circuitry 470 that determines whether aconduction current in a connected bit line is above or below apredetermined level. In some embodiments, sense module 480 includes acircuit commonly referred to as a sense amplifier. Sense module 480 alsoincludes a bit line latch 482 that is used to set a voltage condition onthe connected bit line. For example, a predetermined state latched inbit line latch 482 will result in the connected bit line being pulled toa state designating program inhibit (e.g., Vdd) in order to lock outmemory cells from programming.

Common portion 490 comprises a processor 492, a set of data latches 494and an I/O Interface 496 coupled between the set of data latches 494 anddata bus 420. Processor 492 performs computations. For example, one ofits functions is to determine the data stored in the sensed memory celland store the determined data in the set of data latches. The set ofdata latches 494 is used to store data bits determined by processor 492during a read operation. It is also used to store data bits importedfrom the data bus 420 during a program operation. The imported data bitsrepresent write data meant to be programmed into the memory. I/Ointerface 496 provides an interface between data latches 494 and thedata bus 420.

During read or sensing, the operation of the system is under the controlof state machine 222 that controls (using power control 226) the supplyof different control gate voltages to the addressed memory cell(s). Asit steps through the various predefined control gate voltagescorresponding to the various memory states supported by the memory, thesense module 480 may trip at one of these voltages and an output will beprovided from sense module 480 to processor 492 via bus 472. At thatpoint, processor 492 determines the resultant memory state byconsideration of the tripping event(s) of the sense module and theinformation about the applied control gate voltage from the statemachine via input lines 493. It then computes a binary encoding for thememory state and stores the resultant data bits into data latches 494.In another embodiment of the core portion, bit line latch 482 servesdouble duty, both as a latch for latching the output of the sense module480 and also as a bit line latch as described above.

It is anticipated that some implementations will include multipleprocessors 492. In one embodiment, each processor 492 will include anoutput line (not depicted in FIG. 5) such that each of the output linesis wired-OR′d together. In some embodiments, the output lines areinverted prior to being connected to the wired-OR line. Thisconfiguration enables a quick determination during the programverification process of when the programming process has completedbecause the state machine receiving the wired-OR line can determine whenall bits being programmed have reached the desired level. For example,when each bit has reached its desired level, a logic zero for that bitwill be sent to the wired-OR line (or a data one is inverted). When allbits output a data 0 (or a data one inverted), then the state machineknows to terminate the programming process. In embodiments where eachprocessor communicates with eight sense modules, the state machine may(in some embodiments) need to read the wired-OR line eight times, orlogic is added to processor 492 to accumulate the results of theassociated bit lines such that the state machine need only read thewired-OR line one time.

Data latch stack 494 contains a stack of data latches corresponding tothe sense module. In one embodiment, there are three (or four or anothernumber) data latches per sense module 480. In one embodiment, thelatches are each one bit.

During program or verify, the data to be programmed is stored in the setof data latches 494 from the data bus 420. During the verify process,Processor 492 monitors the verified memory state relative to the desiredmemory state. When the two are in agreement, processor 492 sets the bitline latch 482 so as to cause the bit line to be pulled to a statedesignating program inhibit. This inhibits the memory cell coupled tothe bit line from further programming even if it is subjected toprogramming pulses on its control gate. In other embodiments theprocessor initially loads the bit line latch 482 and the sense circuitrysets it to an inhibit value during the verify process.

In some implementations (but not required), the data latches areimplemented as a shift register so that the parallel data stored thereinis converted to serial data for data bus 420, and vice versa. In onepreferred embodiment, all the data latches corresponding to theread/write block of memory cells can be linked together to form a blockshift register so that a block of data can be input or output by serialtransfer. In particular, the bank of read/write modules is adapted sothat each of its set of data latches will shift data in to or out of thedata bus in sequence as if they are part of a shift register for theentire read/write block.

Additional information about the sensing operations and sense amplifierscan be found in (1) United States Patent Application Pub. No.2004/0057287, “Non-Volatile Memory And Method With Reduced Source LineBias Errors,” published on Mar. 25, 2004; (2) United States PatentApplication Pub No. 2004/0109357, “Non-Volatile Memory And Method withImproved Sensing,” published on Jun. 10, 2004; (3) U.S. PatentApplication Pub. No. 20050169082; (4) U.S. Patent Publication2006/0221692, titled “Compensating for Coupling During Read Operationsof Non-Volatile Memory,” Inventor Jian Chen, filed on Apr. 5, 2005; and(5) U.S. Patent Application Publication No. 2006/0158947, titled“Reference Sense Amplifier For Non-Volatile Memory,” Inventors Siu LungChan and Raul-Adrian Cernea, filed on Dec. 28, 2005. All five of theimmediately above-listed patent documents are incorporated herein byreference in their entirety.

At the end of a successful programming process (with verification), thethreshold voltages of the memory cells should be within one or moredistributions of threshold voltages for programmed memory cells orwithin a distribution of threshold voltages for erased memory cells, asappropriate. FIG. 6 illustrates example threshold voltage distributions(corresponding to data states) for the memory cell array when eachmemory cell stores two bits of data. Other embodiments, however, may usemore or less than two bits of data per memory cell (e.g., such as three,or four or more bits of data per memory cell). The technology describedherein is not limited to any specific number of bits per memory cell.

FIG. 6 shows a first threshold voltage distribution E for erased memorycells. Three threshold voltage distributions A, B and C for programmedmemory cells are also depicted. In one embodiment, the thresholdvoltages in the E distribution are negative and the threshold voltagesin the A, B and C distributions are positive. Each distinct thresholdvoltage distribution of FIG. 6 corresponds to predetermined values forthe set of data bits. The specific relationship between the dataprogrammed into the memory cell and the threshold voltage levels of thememory cell depends upon the data encoding scheme adopted for the memorycells. For example, U.S. Pat. No. 6,222,762 and U.S. Patent ApplicationPublication No. 2004/0255090, both of which are incorporated herein byreference in their entirety, describe various data encoding schemes formulti-state flash memory cells. In one embodiment, data values areassigned to the threshold voltage ranges using a Gray code assignment sothat if the threshold voltage of a floating gate erroneously shifts toits neighboring physical state, only one bit will be affected. Oneexample assigns “11” to threshold voltage range E (state E), “10” tothreshold voltage range A (state A), “00” to threshold voltage range B(state B) and “01” to threshold voltage range C (state C). However, inother embodiments, Gray code is not used. Although FIG. 6 shows fourstates, the present invention can also be used with other multi-statestructures including those that include more or less than four states.

FIG. 6 also shows three read reference voltages, Vra, Vrb and Vrc (alsocalled read compare levels/values), for reading data from memory cells.By testing whether the threshold voltage of a given memory cell is aboveor below Vra, Vrb and Vrc, the system can determine what state thememory cell is in. For example, if a memory cell has a threshold voltageless than Vra, it is assumed to be in state E. If a memory cell has athreshold voltage less than Vrb and greater than Vra, it is assumed tobe in state A. If a memory cell has a threshold voltage less than Vrcand greater than Vrb, it is assumed to be in state B. If a memory cellhas a threshold voltage greater than Vrc, it is assumed to be in stateC.

FIG. 6 also shows three verify reference voltages, Vva, Vvb and Vvc(also called verify compare values/levels). When programming memorycells to state A, the system will test whether those memory cells have athreshold voltage greater than or equal to Vva. When programming memorycells to state B, the system will test whether the memory cells havethreshold voltages greater than or equal to Vvb. When programming memorycells to state C, the system will determine whether memory cells havetheir threshold voltage greater than or equal to Vvc.

In one embodiment, known as full sequence programming, memory cells canbe programmed from the erase state E directly to any of the programmedstates A, B or C. For example, a population of memory cells to beprogrammed may first be erased so that all memory cells in thepopulation are in erased state E. Then, a programming process is used toprogram memory cells directly into states A, B or C. While some memorycells are being programmed from state E to state A, other memory cellsare being programmed from state E to state B and/or from state E tostate C.

FIG. 7 illustrates one example of a two-stage technique of programming amulti-state memory cell that stores data for two different pages: alower page and an upper page. Four states are depicted: state E (11),state A (10), state B (00) and state C (01). For state E, both pagesstore a “1.” For state A, the lower page stores a “0” and the upper pagestores a “1.” For state B, both pages store “0.” For state C, the lowerpage stores “1” and the upper page stores “0.” Note that althoughspecific bit patterns have been assigned to each of the states,different bit patterns may also be assigned. In a first programmingstage, the memory cells' threshold voltages levels are set according tothe bit to be programmed into the lower logical page. If that bit is alogic “1,” the threshold voltage is not changed since the respectivememory cell is in the appropriate state as a result of having beenearlier erased. However, if the bit to be programmed is a logic “0,” thethreshold level of the cell is increased to be state A, as shown byarrow 504. That concludes the first programming stage.

In a second programming stage, the memory cell's threshold voltage levelis set according to the bit being programmed into the upper logicalpage. If the upper logical page bit is to store a logic “1,” then noprogramming occurs since the memory cell is in one of states E or A,depending upon the programming of the lower page bit, both of whichcarry an upper page bit of “1.” If the upper page bit is to be a logic“0,” then the threshold voltage is shifted. If the first stage resultedin the memory cell remaining in the erased state E, then in the secondstage the memory cell is programmed so that the threshold voltage isincreased to be within state C, as depicted by arrow 502. If the memorycell had been programmed into state A as a result of the firstprogramming stage, then the memory cell is further programmed in thesecond stage so that the threshold voltage is increased to be withinstate B, as depicted by arrow 506. The result of the second stage is toprogram the memory cell into the state designated to store a logic “0”for the upper page without changing the data for the lower page.

In one embodiment, a system can be set up to perform full sequencewriting if enough data is written to fill up an entire page. If notenough data is written for a full page, then the programming process canprogram the lower page programming with the data received. Whensubsequent data is received, the system will then program the upperpage. In yet another embodiment, the system can start writing in themode that programs the lower page and convert to full sequenceprogramming mode if enough data is subsequently received to fill up anentire (or most of a) word line's memory cells. More details of such anembodiment are disclosed in U.S. Patent Application 2006/0126390,incorporated herein by reference in its entirety.

FIGS. 8A-C describe another multi-stage programming process forprogramming non-volatile memory. The process of FIG. 8A-C reducesfloating gate to floating gate coupling by, for any particular memorycell, writing to that particular memory cell with respect to aparticular page subsequent to writing to adjacent memory cells forprevious pages. In one example of an implementation of the processtaught by FIGS. 8A-C, the non-volatile memory cells store two bits ofdata per memory cell, using four data states. For example, assume thatstate E is the erased state and states A, B and C are the programmedstates. FIG. 9 shows one example of the relationship between states anddata stored. State E stores data 11. State A stores data 01. State Bstores data 00. State C stores data 10 This is an example of Graycoding. Other encodings of data to physical data states can also beused. Each memory cell stores two pages of data. For reference purposes,these pages of data will be called upper page and lower page; however,they can be given other labels. With reference to state A for theprocess of FIGS. 8A-C, the upper page stores data 0 and the lower pagestores data 1. With reference to state B, both pages stores data 0. Withreference to state C, the lower pages stores data 0 and the upper pagestores data 1. In other embodiments, the programming processes of FIGS.6 and 7 and be configured to program data according to the table of FIG.9.

The programming process of FIGS. 8A-C is a two-stage programmingprocess; however, the process of FIGS. 8A-C can be used to implement athree stage process, a four stage process, etc. In the first stage, thelower page is programmed. If the lower page is to remain data 1, thenthe memory cell state remains at state E. If the lower page data is tobe programmed to 0, then the threshold of voltage of the memory cell israised such that the memory cell is programmed to state B′. FIG. 8Ashows the programming of memory cells from state E to state B′. State B′depicted in FIG. 8A is an interim state B; therefore, the verify pointis depicted as Vvb′, which is lower than Vvb.

In one embodiment, after a memory cell is programmed from state E tostate B′, its neighbor memory cell (on word line WLn+1) in the NANDstring will then be programmed with respect to its lower page. Afterprogramming the neighbor memory cell, the floating gate to floating gatecoupling effect may raise the apparent threshold voltage of earlierprogrammed memory cell. This will have the effect of widening thethreshold voltage distribution for state B′ to that depicted asthreshold voltage distribution 520 of FIG. 8B. This apparent widening ofthe threshold voltage distribution will be remedied when programming theupper page.

FIG. 8C depicts the process of programming the upper page. If the memorycell is in erased state E and the upper page is to remain at 1, then thememory cell will remain in state E. If the memory cell is in state E andits upper page data is to be programmed to 0, then the threshold voltageof the memory cell will be raised so that the memory cell is in state A.If the memory cell was in intermediate threshold voltage distribution520 and the upper page data is to remain at 1, then the memory cell willbe programmed to final state C. If the memory cell is in intermediatethreshold voltage distribution 520 and the upper page data is to becomedata 0, then the memory cell will be to state B. The process depicted byFIGS. 8A-C reduces the effect of floating gate to floating gate couplingbecause only the upper page programming of neighbor memory cells willhave an effect on the apparent threshold voltage of a given memory cell.

Although FIGS. 8A-C provide an example with respect to four data statesand two pages of data, the concepts taught by FIGS. 8A-C can be appliedto other implementations with more or less than four states anddifferent than two pages. More details about the programming process ofFIG. 8A-C can be found in U.S. Pat. No. 7,196,928, incorporated hereinby reference.

FIG. 10 is a flow chart describing one embodiment of a process foroperating non-volatile memory, such as the system of FIG. 3 (or othersystems). In step 600, a request to program data is received. Therequest can be from a host, another device or the controller. Therequest can be received at the controller, control circuitry, statemachine, or other device. In response to the request, the controller,control circuitry, state machine, or other component will determinewhich block of flash memory cells will be used to store the data in step602. The data will be programmed into the determined block using any ofthe programming processes described above (or other programmingprocesses) in step 604. The programmed data will be read one or manytimes in step 606. There is a dashed line between steps 604 and 606because an unpredictable amount of time may pass between the steps, andstep 606 is not performed in response to step 604. Rather, step 606 isperformed in response to a request to read the data or other event.

FIG. 11 is a flow chart describing a programming process for programmingmemory cells in a block. The process of FIG. 11 is one embodiment ofstep 604 of FIG. 10. In step 632, memory cells are erased (in blocks orother units) prior to programming. Memory cells are erased in oneembodiment by raising the p-well to an erase voltage (e.g., 20 volts)for a sufficient period of time and grounding the word lines of aselected block while the source and bit lines are floating. A strongelectric field is, thus, applied to the tunnel oxide layers of selectedmemory cells and the selected memory cells are erased as electrons ofthe floating gates are emitted to the substrate side, typically byFowler-Nordheim tunneling mechanism. As electrons are transferred fromthe floating gate to the p-well region, the threshold voltage of theselected memory cells is lowered. Erasing can be performed on the entirememory array, on individual blocks, or another unit of cells. Othertechniques for erasing can also be used.

In step 634, soft programming is performed to narrow the thresholdvoltage distribution of the erased memory cells. Some memory cells maybe in a deeper erased state than necessary as a result of the eraseprocess. Soft programming can apply programming pulses to move thethreshold voltage of the deeper erased memory cells to a higherthreshold voltage that is still in a valid range for the erased state.In step 636, the memory cells of the block are programmed as describedherein. The process of FIG. 11 can be performed at the direction of thestate machine, controller or combination of state machine andcontroller, using the various circuits described above. For example, thecontroller may issue commands and data to the state machine to programthe data. In response, the state machine may operate the circuitsdescribed above to carry out the programming operations.

FIG. 12 is a flow chart describing one embodiment of a process forperforming programming on one or more memory cells connected to a commonword line. Therefore, when programming a block of memory cells theprocess of FIG. 12 is performed one or more times for each word line ofthe block. The process of FIG. 12 can be performed one or multiple timesduring step 636 of FIG. 11. For example, the process of FIG. 12 can beused to program memory cells (e.g., full sequence programming) fromstate E directly to any of states A, B or C. Alternatively, the processof FIG. 12 can be used to perform one or each of the stages of theprocess of FIG. 7, FIGS. 8A-C, or other programming schemes. Forexample, when performing the process of FIGS. 8A-C, the process of FIG.12 is used to implement the first stage that includes programming someof the memory cells from state E to state B′. The process of FIG. 12 canthen be used again to implement the second stage that includesprogramming some of the memory cells from state E to state A and fromstate B′ to states B and C.

Typically, the program voltage applied to the control gate during aprogram operation is applied as a series of program pulses. Betweenprogramming pulses are a set of one or more verify pulses to performverification. In many implementations, the magnitude of the programpulses is increased with each successive pulse by a predetermined stepsize. In step 770 of FIG. 12, the programming voltage (Vpgm) isinitialized to the starting magnitude (e.g., ˜12-16V or another suitablelevel) and a program counter PC maintained by state machine 222 isinitialized at 1.

In step 772, a program pulse of the program signal Vpgm is applied tothe selected word line (the word line selected for programming). In oneembodiment, the group of memory cells being programmed are all connectedto the same word line (the selected word line). The unselected wordlines receive one or more boosting voltages (e.g., ˜9 volts) to performboosting schemes known in the art in order to avoid program disturb.There are many different boosting schemes that can be used with thetechnology described herein. To provide the boosting voltages on theunselected word lines, step 772 includes stepping the voltages of theneighboring unselected word lines. That is, the unselected word linesthat are next to the selected word line will first be raised to one ormore intermediate voltages and then subsequently raised to their one ormore target boosting voltages. The program voltage will also be raisedfirst to an intermediate voltage and then to the target program voltageconcurrently with the neighboring unselected word lines.

In one embodiment, if a memory cell should be programmed, then thecorresponding bit line is grounded. On the other hand, if the memorycell should remain at its current threshold voltage, then thecorresponding bit line is connected to Vdd to inhibit programming. Instep 772, the program pulse is concurrently applied to all memory cellsconnected to the selected word line so that all of the memory cellsconnected to the selected word line that should be programmed areprogrammed concurrently. That is, they are programmed at the same time(or during overlapping times). In this manner all of the memory cellsconnected to the selected word line will concurrently have theirthreshold voltage change, unless they have been locked out fromprogramming. In step 774, the appropriate memory cells are verifiedusing the appropriate set of target levels to perform one or more verifyoperations. If a memory cell is verified to have reached its target, itis locked out from further programming. One embodiment for locking out amemory cell from further programming is to raise the corresponding bitline voltage to, for example, Vdd.

In step 776, it is determined whether all the memory cells have reachedtheir target threshold voltages. If so, the programming process iscomplete and successful because all selected memory cells wereprogrammed and verified to their target states. A status of “PASS” isreported in step 778. If, in 776, it is determined that not all of thememory cells have reached their target threshold voltages, then theprogramming process continues to step 780.

In step 780, the system counts the number of memory cells that have notyet reached their respective target threshold voltage distribution. Thatis, the system counts the number of memory cells that have failed theverify process. This counting can be done by the state machine, thecontroller, or other logic. In one implementation, each of the senseblocks 300 (see FIG. 3) will store the status (pass/fail) of theirrespective memory cells. These values can be counted using a digitalcounter. As described above, many of the sense blocks have an outputsignal that is wire-Or'd together. Thus, checking one line can indicatethat no cells of a large group of cells have failed verify. Byappropriately organizing the lines being wired-Or together (e.g., abinary tree-like structure), a binary search method can be used todetermine the number of cells that have failed. In such a manner, if asmall number of cells failed, the counting is completed rapidly. If alarge number of cells failed, the counting takes a longer time. Moreinformation can be found in United States Patent Publication2008/0126676, incorporated herein by reference in its entirety. Inanother alternative, each of the sense amplifiers can output an analogvoltage or current if its corresponding memory cell has failed and ananalog voltage or current summing circuit can be used to count thenumber of memory cells that have failed. In one embodiment, there is onetotal counted, which reflects the total number of memory cells currentlybeing programmed that have failed the last verify step. In anotherembodiment, separate counts are kept for each data state.

In step 782, it is determined whether the count from step 780 is lessthan or equal to a predetermined limit. In one embodiment, thepredetermined limit is the number of bits that can be corrected by ECCduring a read process for the page of memory cells. If the number offailed cells is less than or equal to the predetermined limit, than theprogramming process can stop and a status of “PASS” is reported in step778. In this situation, enough memory cells programmed correctly suchthat the few remaining memory cells that have not been completelyprogrammed can be corrected using ECC during the read process. In someembodiments, step 780 will count the number of failed cells for eachsector, each target data state or other unit, and those counts willindividually or collectively be compared to a threshold in step 782. Inanother embodiment, the predetermined limit can be less than the numberof bits that can be corrected by ECC during a read process to allow forfuture errors. When programming less than all of the memory cells for apage, or comparing a count for only one data state (or less than allstates), than the predetermined limit can be a portion (pro-rata or notpro-rata) of the number of bits that can be corrected by ECC during aread process for the page of memory cells. In some embodiments, thelimit is not predetermined. Instead, it changes based on the number oferrors already counted for the page, the number of program-erase cyclesperformed, temperature or other criteria.

If the number of failed cells is not less than the predetermined limit,than the programming process continues at step 784 and the programcounter PC is checked against the program limit value (PL). One exampleof a program limit value is 20; however, other values can be used. Ifthe program counter PC is not less than the program limit value PL, thenthe program process is considered to have failed and a status of FAIL isreported in step 788. If the program counter PC is less than the programlimit value PL, then the process continues at step 786 during which timethe Program Counter PC is incremented by 1 and the program voltage Vpgmis stepped up to the next magnitude. For example, the next pulse willhave a magnitude greater than the previous pulse by a step size (e.g., astep size of 0.1-0.4 volts). After step 786, the process loops back tostep 772 and another program pulse is applied to the selected word line.

During verify operations (e.g., step 774) and read operations, theselected word line is connected to a voltage, a level of which isspecified for each read operation (e.g., Vra, Vrb, and Vrc,) or verifyoperation (e.g. Vva, Vvb, and Vvc) in order to determine whether athreshold voltage of the concerned memory cell has reached such level.After applying the word line voltage, the conduction current of thememory cell is measured to determine whether the memory cell turned onin response to the voltage applied to the word line. If the conductioncurrent is measured to be greater than a certain value, then it isassumed that the memory cell turned on and the voltage applied to theword line is greater than the threshold voltage of the memory cell. Ifthe conduction current is not measured to be greater than the certainvalue, then it is assumed that the memory cell did not turn on and thevoltage applied to the word line is not greater than the thresholdvoltage of the memory cell.

There are many ways to measure the conduction current of a memory cellduring a read or verify operation. In one example, the conductioncurrent of a memory cell is measured by the rate it discharges orcharges a dedicated capacitor in the sense amplifier. In anotherexample, the conduction current of the selected memory cell allows (orfails to allow) the NAND string that includes the memory cell todischarge a corresponding bit line. The voltage on the bit line ismeasured after a period of time to see whether it has been discharged ornot. Note that the technology described herein can be used withdifferent methods known in the art for verifying/reading. Moreinformation about verifying/reading can be found in the following patentdocuments that are incorporated herein by reference in their entirety:(1) United States Patent Application Pub. No. 2004/0057287; (2) UnitedStates Patent Application Pub No. 2004/0109357; (3) U.S. PatentApplication Pub. No. 2005/0169082; and (4) U.S. Patent Application Pub.No. 2006/0221692. The erase, read and verify operations described aboveare performed according to techniques known in the art. Thus, many ofthe details explained can be varied by one skilled in the art. Othererase, read and verify techniques known in the art can also be used.

Sometimes, because of thermal effects from the environment, capacitivecoupling from neighboring memory cells, or other effects, the thresholdvoltage of the cell as measured from the control gate may change. Thiscan result in errors when reading the data. Such read errors may beprevented by changing the read compare points (e.g., Vra, Vrb and Vrc)in response to changes in the distribution of the threshold voltages forthe relevant population of memory cells.

FIG. 13 is a flow chart showing one embodiment of a method to read data,and, if necessary, update the read compare voltages used to perform readoperations. The process begins with step 1302, in which the systemperforms a read operation on a subset of the data stored in memory cellsconnected to a selected word line. This may be done by applying a readcompare voltage on the word line and testing the current flowing throughthe bit line to determine whether the memory cell transistors areconducting. In some embodiments of step 1302, the system may also employ“Neighbor Word line Compensation”, wherein the system changes thevoltage on one or more neighboring (or nearby) word lines in order toaccount for capacitive coupling between neighboring (or nearby) memorycells. More information about Neighbor Word line Compensation can befound in U.S. Pat. No. 7,499,319, titled “Read Operation forNon-Volatile Storage with Compensation for Coupling”, incorporatedherein by reference in its entirety. One embodiment of step 1302includes applying a current read compare voltage to a selected memorycell, applying a particular voltage to a neighbor of the selected memorycell based on a current condition of the neighbor while applying thecurrent read compare voltage to the selected memory cell and sensing acondition of the selected memory cell (i.e. non-volatile storageelement).

In step 1304, the system checks whether or not there are errors with thedata read from the selected word line. If there is no error detected,then the data is assumed to be correct, and in step 1306, the systemreports the read data to the user.

If, in step 1304, the system does detect errors, then in step 1308, thesystem checks whether the errors can be corrected using methods such asECC. If the errors can be corrected, then the system corrects the errorsin step 1310 before reporting the corrected data in step 1306.

If, however, the system determines that standard methods such as ECCcannot resolve the detected errors, then the system will attempt torecover the data by update the read compare voltages and re-performingthe read operations with the updated read compare voltages. In step1312, then determines the current threshold distribution of the relevantpopulation of memory cells. One embodiment of step 1312 includes: foreach set of read compare voltages of a plurality of different sets ofread compare voltages, performing multiple sensing operations that eachsense a different page of data from a population of non-volatile storageelements and determining threshold voltage distributions for thepopulation of non-volatile storage elements based on the multiplesensing operations. More information about determining the currentthreshold distribution is described below. In step 1314, the system usesthe newly determined current threshold voltage distributions learned instep 1312 to update the read compare voltages. In some cases, the readcompare voltages determined in this step may differ from the previous ordefault read compare voltages used for read operations such as thatemployed in step 1302. In some embodiments, if the system has notchanged any of the read compare voltages in step 1314, then the systemmay proceed directly to step 1326 and report an error.

In step 1316, the memory system performs a read operation that issimilar to the process conducted in step 1302, except that the readoperation of step 1316 uses the new read compare voltages determined instep 1314. In step 1318, the memory system checks to determine whetherthere are errors in the data read in step 1316. If an error is notfound, then in step 1320 the system reports the read data to the user.If errors are detected, then the system checks in step 1322 (as in step1308) whether the errors are correctable. If so, then the systemcorrects the errors in step 1324 (e.g., using ECC) and reports thecorrected data in step 1320. Otherwise, the system reports an error instep 1326.

FIG. 14 is a flow chart showing a process that includes, for each set ofread compare voltages of a plurality of different sets of read comparevoltages, performing multiple sensing operations that each sense adifferent page of data from a population of non-volatile storageelements. The results of this process is used with a set of equationsprovided below to determine threshold voltage distributions for thepopulation of non-volatile storage elements based on the multiplesensing operations. This represents one example implementation of step1312 of FIG. 13. In some embodiments, the process of FIG. 14 isperformed on all (or a subset of) memory cells connected to a word line.In other embodiments, the process of FIG. 14 is performed on all (or asubset of) memory cells in a block (or other unit). As will be explainedlater, the determined threshold voltage distribution may then be used todetermine new optimal read compare voltages for the available states. Instep 1400, the system initializes a counting mechanism. In someembodiments, a digital counter on the memory chip may be set to ‘0’. Inother embodiments, the counting process may be handled by externalcontroller 244. The value of this counter corresponds to the readcompare voltages used in steps 1402 and 1404, as explained below. By wayof example only, suppose that the voltages between 0 and 5.4 Volts aredesignated by the system to be the range of threshold voltages for thepopulation of memory cells. Then, in one embodiment, when the counter is0, Vra is set to 0V, Vrb is set to 1.8V, and Vrc is set to 3.6V. In step1402, the system reads the upper pages on a set of memory cells, using aprocess such as that described in FIG. 15. Then, in step 1404, thesystem reads the lower pages on the same set of memory cells as thoseread in step 1402, using a process such as that described in FIG. 16. Insteps 1402 and 1404, data bits representing the results of the readoperations are stored in a pair of latches, though in some embodimentsin which memory cells store more bits, more latches can be used. In step1406, the system performs logical operations on the bits stored in theselatches in order to determine the state of the cell which was read insteps 1402 and 1404. More information about step 1406 is provided below.The memory system will maintain a data structure of the results of thevarious iterations of step 1406. The data structure is referred to asthe Distribution Database. In step 1408, the results of the current step1406 are added to the results of previous iterations of step 1406 (ifany) in the Distribution Database. In one embodiment, the data is movedto and stored in the controller, while in other embodiments the data isstored in the memory chip.

In step 1410, the system checks whether the counter (or equivalent) thatwas initialized in step 1400 has reached a certain maximum value, whichwill be denoted herein as ‘X.’ In one embodiment, which will beexplained in greater detail below, X may equal 9, such that the systemmay complete the process of FIG. 14 up to 9 times. If the check of step1410 passes, then in step 1412, the system finishes and exits theprocess. However, if the check of step 1410 does not pass, then thesystem transitions to step 1414, wherein the system adds 1 to thecounter checked by step 1410. After step 1414, the system transitions tostep 1416, wherein the system changes the read compare voltages used inthe read operations of steps 1402 and 1404. In some embodiments, theread compare voltages may each be increased by 0.2V every time thesystem performs step 1416. Thus, when the counter value is at 1, Vra maybe set to 0.2V, Vrb may be set to 2.0V, and Vrc may be set to 3.8V.Similarly, when the counter value is at 8, Vra may be set to 1.6V, Vrbmay be set to 3.4V, and Vrc may be set to 5.2V. After step 1416, thesystem moves back to step 1402, wherein the system will repeat steps1402-1410, wherein the read operations will be performed using the readcompare voltages updated by step 1416.

FIG. 15 is a flow chart describing a process for reading the upper pageof a memory cell. The process of FIG. 15 is one example implementationof step 1402 of FIG. 14. While the following description applies tomemory cells that store two bits of data per memory cell, the processcan be adjusted to read memory cells that can store any number of bits.The process begins with step 1502, in which the system performs a readoperation at Vra. That is, the voltage level Vra is applied to theselected word line. In step 1504, the system determines whether thememory cells turn on in response to Vra at the control gates by testingwhether the memory cells conduct current. Those memory cells thatconduct current in response to Vra have a threshold voltage less than orequal to Vra. If the memory cell conducts, then in step 1506 the systemstores a “1” bit on the latch associated with the Upper Page (UP Latch).If the memory cell conducts when the control gate of the memory cell isat Vra, then the memory cell is in state E, corresponding to two-bitbinary code “11”, as shown in FIG. 9. The Upper Page latch into whichthe page value is stored may be located with the other data latches inblock 494 of FIG. 5. After step 1506, the system finishes the process instep 1508. Otherwise, the system proceeds to step 1510 to perform a readusing Vrc to again determine the state of the cell in question. That is,the system applies Vrc to the selected word line and performs a readoperation to determine whether the threshold voltage of the memory cellsare above or below Vrc. If the memory cell conducts (step 1512), then,in step 1514 the system writes a “0” to the UP Latch before exiting theprocess in step 1518. If the channel of a memory cell conducts when thecontrol gate of the memory cell is at Vrc, then the memory cell iseither in state A or state B, and in either case the Upper Page takesthe value “0”, as shown in FIG. 9. However, the system writes a “1” tothe UP latch in step 1516 if the memory cell does not conduct inresponse to Vrc at the control gate, since if the channel of a memorycell does not conduct even when the control gate of the memory cell isat Vrc then the memory cell is in state C, corresponding to two-bitbinary code “01.”

FIG. 16 is a flow chart describing a process for reading the lower pageon a memory cell. The process of FIG. 16 is one example implementationof step 1404 of FIG. 14. In step 1602, the memory system performs a readoperation by applying the voltage level Vrb to the selected word line inorder to determine whether the lower page is a “1” or a “0”. By applyingVrc to the selected word line, the control gates will be at Vrc and aread operation will be performed to determine whether the thresholdvoltage of the memory cells in below Vrc. If a memory cell conducts inresponse to Vrc (step 1604), then in step 1606 the system stores a “1”bit on the latch associated with the Lower Page (LP Latch). If thechannel of a memory cell conducts when the control gate of the memorycell is at Vrb, then the memory cell is either in state E or A, and ineither case the Lower Page data value “1”, as depicted in FIG. 9. The LPLatch into which the page value is stored may be located with the otherdata latches in block 494 of FIG. 5. If the memory cell does notconduct, then in step 1608, the system writes a “0” to the LP Latch.After step 1606 or step 1608 is completed, the system exits the processin step 1610.

FIG. 17 is a flow chart describing a process for using data from memorycell reads in order to determine the distribution of cells among thevarious possible states. The process of FIG. 17 is one exampleimplementation of steps 1406 and 1408 in FIG. 14. In one embodiment, theprocess of FIG. 17 determines (for each set of read compare voltages ofthe plurality of different sets of read compare voltages) how manymemory cells are in each data state based on the first page read and asecond page read for the respective set of read compare voltages. In oneexample implementation, this includes, for at least a subset of datastates, performing a logical operation on both bits of data for thenon-volatile storage elements to determine results which indicatewhether respective non-volatile storage element are in a state beingtested for and counting the results for at least the subset of datastates.

While the following description will apply to memory cells that storetwo bits of data, the process can be modified to accommodate memorycells that store any number of bits. In step 1702, the system appliesthe AND logical operation to the pair of latches storing the upper andlower pages of a given memory cell, the latches storing the results ofthe read processes described in FIGS. 15 and 16. In step 1704, thesystem stores the output of the AND operation in a result data latch (RLatch), possibly located among the latches in block 494 of FIG. 5. Thatis R Latch=UP Latch AND LP Latch. If the AND operation returns a “1”(step 1706), then both latches (UP Latch and LP Latch) stored a “1,”which corresponds to an erased state (E). This determination is made foreach memory cell being read, and then the system counts the number ofmemory cells in the E state (step 1708). In one embodiment, the memorychip will have a counter that counts all of the R Latches indicatingthat the respective memory cell is in E state. In another embodiment,the memory system moves the data from all of the R Latches to theController, the Controller counts the number of memory cells sensed tobe in E state and stores the data in the Distribution Database. Afterperforming step 1708, the process is complete (step 1710).

If the AND operation of step 1702 returns “0” (step 1706), then in step1712 the system applies an AND operation to the Lower Page latch and theinverse of the Upper Page. The result of the AND operation is stored inthe Result Latches, such that for each bit R Latch=˜UP Latch AND LPLatch. If the result of the AND operation of step 1712 is a 1 (step1716), then the respective memory cell is in state A. This determinationis made for each memory cell being read, and then the system counts thenumber of memory cells in state A (step 1718). In one embodiment, thememory chip will have a counter that counts all of the R Latchesindicating that the respective memory cell is in state A. In anotherembodiment, the memory system moves the data from all of the R Latchesto the Controller, the Controller counts the number of memory cellssensed to be in state A and stores the data in the DistributionDatabase. After performing step 1718, the process is complete (step1720).

If the AND operation of step 1712 returns “0” (step 1716), then in step1722 the system applies an AND operation to the inverse of Lower Pagelatch and the Upper Page Latch. The result of the AND operation isstored in the Result Latches, such that for each bit R Latch=UP LatchAND˜LP Latch. If the result of the AND operation of step 1722 is a 0(step 1726), then the respective memory cell is in state C. Thisdetermination is made for each memory cell being read, and then thesystem counts the number of memory cells in state C (step 1728). In oneembodiment, the memory chip will have a counter that counts all of the RLatches indicating that the respective memory cell is in state A. Inanother embodiment, the memory system moves the data from all of the RLatches to the Controller, the Controller counts the number of memorycells sensed to be in state A and stores the data in the DistributionDatabase. After performing step 1728, the process is complete (step1732).

If the result of the AND operation of step 1722 is a 01(step 1726), thenthe respective memory cell is in state B. This determination is made foreach memory cell being read, and then the system counts the number ofmemory cells in state B (step 1730). In one embodiment, the memory chipwill have a counter that counts all of the R Latches indicating that therespective memory cell is in state A. In another embodiment, the memorysystem moves the data from all of the R Latches to the Controller, theController counts the number of memory cells sensed to be in state A andstores the data in the Distribution Database. After performing step1730, the process is complete (step 1732).

Note that in some embodiments, step 1728 will not be performed. In thisembodiment, the system counts memory cells in states E, A, and B. Thesystem can then calculate the number of memory cells in states C asC=(Total Number of Memory cells Read)−(number of memory cells in statesE+number of memory cells in state A+number of memory cells in state B).

The process of FIG. 17 is performed for all of the memory cells read ateach iteration of the process of FIG. 14 so that at the end of theprocess of FIG. 14, the Distribution Database indicates how many memorycells are detected to be in each of states E, A, B and C for each of theX sets of read compare values used.

In one embodiment, the data in the Distribution Database is used todetermine the threshold voltage distribution. One example methodinvolves dividing the threshold voltage window (the range of thresholdvoltages for states E-C) into “bins” having an upper bound and a lowerbound. Each bin will be assigned a magnitude corresponding to the numberof memory cells having a threshold voltage between the upper bound andthe lower bound. That is the magnitude indicates the number of memorycells that are not turned on by the lower bound at its control gate, butare turned on by the upper bound at its control gate.

FIG. 18 is a graph depicting a portion of a threshold voltagedistribution. This graph may represent a portion of a threshold voltagedistribution of memory cells depicted in FIG. 8C. The vertical axis ofthe graph represents the number of memory cells, and the horizontal axisrepresents the threshold voltage. While curve 1800 is an idealizedcontinuous distribution, in practice curve 1800 may represent a trendline connecting discrete data points.

Step 1312 of FIG. 13, dynamically determining the threshold voltagedistribution, includes determining the magnitude of each bin so that thefull graph of FIG. 18 is created. This is accomplished by firstperforming the process of FIG. 14 (for each set of read compare voltagesof a plurality of different sets of read compare voltages, performingmultiple sensing operations that each sense a different page of datafrom a population of non-volatile storage elements) to create theDistribution Database and then using the following example equations inTable 1 for computing the magnitudes of the bins from the data containedin the Distribution Database (determining threshold voltagedistributions for the population of non-volatile storage elements basedon the multiple sensing operations).

Table 1 includes six columns. The first two columns indicate the lowerbound (Start Voltage) and the upper bound (End Voltage) of each bin. Thethird column (Bin#) identifies the bin. The fourth column (Equation) isthe equation for determining the magnitude of the graph for each bin. Inone embodiment, the equation determines the magnitude of the center ofthe bin. The fifth column (Simplified Equation) is a simplified versionof the fourth column.

In the equations, E0 represents the number of memory cells determined tobe in state E for iteration 0 (Read Compare Voltage Counter=0) of theloop in the process of FIG. 14. Similarly, E1 represents the number ofmemory cells determined to be in state E for iteration 1, E2 representsthe number of memory cells determined to be in state E for iteration 2,E3 represents the number of memory cells determined to be in state E foriteration 3, E4 represents the number of memory cells determined to bein state E for iteration 4, E5 represents the number of memory cellsdetermined to be in state E for iteration 5, E6 represents the number ofmemory cells determined to be in state E for iteration 6, E7 representsthe number of memory cells determined to be in state E for iteration 7,and E8 represents the number of memory cells determined to be in state Efor iteration 8.

In the equations, A0 represents the number of memory cells determined tobe in state A for iteration 0 (Read Compare Voltage Counter=0) of theloop in the process of FIG. 14. Similarly, A1 represents the number ofmemory cells determined to be in state A for iteration 1, A2 representsthe number of memory cells determined to be in state A for iteration 2,A3 represents the number of memory cells determined to be in state A foriteration 3, A4 represents the number of memory cells determined to bein state A for iteration 4, A5 represents the number of memory cellsdetermined to be in state A for iteration 5, A6 represents the number ofmemory cells determined to be in state A for iteration 6, A7 representsthe number of memory cells determined to be in state A for iteration 7,and A8 represents the number of memory cells determined to be in state Afor iteration 8.

In the equations, B0 represents the number of memory cells determined tobe in state B for iteration 0 (Read Compare Voltage Counter=0) of theloop in the process of FIG. 14. Similarly, B1 represents the number ofmemory cells determined to be in state B for iteration 1, B2 representsthe number of memory cells determined to be in state B for iteration 2,B3 represents the number of memory cells determined to be in state B foriteration 3, B4 represents the number of memory cells determined to bein state B for iteration 4, B5 represents the number of memory cellsdetermined to be in state B for iteration 5, B6 represents the number ofmemory cells determined to be in state B for iteration 6, B7 representsthe number of memory cells determined to be in state B for iteration 7,and B8 represents the number of memory cells determined to be in state Bfor iteration 8.

In the equations, C0 represents the number of memory cells determined tobe in state C for iteration 0 (Read Compare Voltage Counter=0) of theloop in the process of FIG. 14. Similarly, C1 represents the number ofmemory cells determined to be in state C for iteration 1, C2 representsthe number of memory cells determined to be in state C for iteration 2,C3 represents the number of memory cells determined to be in state C foriteration 3, C4 represents the number of memory cells determined to bein state C for iteration 4, C5 represents the number of memory cellsdetermined to be in state C for iteration 5, C6 represents the number ofmemory cells determined to be in state C for iteration 6, C7 representsthe number of memory cells determined to be in state C for iteration 7,and C8 represents the number of memory cells determined to be in state Cfor iteration 8.

TABLE 1 Start End Voltage Voltage Bin # Equation Simplified Equation 0.0V 0.2 V K0 = E1 − E0 = E1 − E0 0.2 V 0.4 V K1 = E2 − E1 = E2 − E1 0.4 V0.6 V K2 = E3 − E2 = E3 − E2 0.6 V 0.8 V K3 = E4 − E3 = E4 − E3 0.8 V1.0 V K4 = E5 − E4 = E5 − E4 1.0 V 1.2 V K5 = E6 − E5 = E6 − E5 1.2 V1.4 V K6 = E7 − E6 = E7 − E6 1.4 V 1.6 V K7 = E8 − E7 = E8 − E7 1.6 V1.8 V K8 = E0 + A0 − E8 = E0 + A0 − E8 1.8 V 2.0 V K9 = A1 − A0 + E1 −E0 = A1 − A0 + K0 2.0 V 2.2 V K10 = A2 − A1 + E2 − E1 = A2 − A1 + K1 2.2V 2.4 V K11 = A3 − A2 + E3 − E2 = A3 − A2 + K2 2.4 V 2.6 V K12 = A4 −A3 + E4 − E3 = A4 − A3 + K3 2.6 V 2.8 V K13 = A5 − A4 + E5 − E4 = A5 −A5 + K4 2.8 V 3.0 V K14 = A6 − A5 + E6 − E5 = A6 − A5 + K5 3.0 V 3.2 VK15 = A7 − A6 + E7 − E6 = A7 − A6 + K6 3.2 V 3.4 V K16 = A8 − A7 + E8 −E8 = A8 − A7 + K7 3.4 V 3.6 V K17 = E0 + A0 + B0 − (E8 + A8) = B0 − A8 +K8 3.6 V 3.8 V K18 = B1 − B0 + A1 − A0 + (E1 − E0) = B1 − B0 + K9 3.8 V4.0 V K19 = B2 − B1 + A2 − A1 + (E2 − E1) = B2 − B1 + K10 4.0 V 4.2 VK20 = B3 − B2 + A3 − A2 + (E3 − E2) = B3 − B2 + K11 4.2 V 4.4 V K21 = B4− B3 + A4 − A3 + (E4 − E3) = B4 − B3 + K12 4.4 V 4.6 V K22 = B5 − B4 +A5 − A4 + (E5 − E4) = B5 − B4 + K13 4.6 V 4.8 V K23 = B6 − B5 + A6 −A5 + (E6 − E5) = B6 − B5 + K14 4.8 V 5.0 V K24 = B7 − B6 + A7 − A6 + (E7− E6) = B7 − B6 + K15 5.0 V 5.2 V K25 = B8 − B7 + A8 − A7 + (E8 − E7) =B8 − B7 + K16 5.2 V 5.4 V K26 = E0 + A0 + B0 + C0 − C0 − B8 + K17 (E8 +A8 + B8) = 5.4 V 5.6 V K27 = C1 − C0 + B1 − B0 + A1 − C1 − C0 + K18 A0 +(E1 − E0) = 5.6 V 5.8 V K28 = C2 − C1 + B2 − B1 + A2 − C2 − C1 + K19A1 + (E2 − E1) = 5.8 V 6.0 V K29 = C3 − C2 + B3 − B2 + A3 − A2 + C3 −C2 + K20 (E3 − E2) = 6.0 V 6.2 V K30 = C4 − C3 + B4 − B3 + A4 − C4 −C3 + K21 A3 + (E4 − E3) = 6.2 V 6.4 V K31 = C5 − C4 + B5 − B4 + A5 − C5− C4 + K22 A4 + (E5 − E4) = 6.4 V 6.6 V K32 = C6 − C5 + B6 − B5 + A6 −C6 − C5 + K23 A5 + (E6 − A5) = 6.6 V 6.8 V K33 = C7 − C6 + B7 − B6 + A7− C7 − C6 + K24 A6 + (E7 − E6) = 6.8 V 7.0 V K34 = C8 − C7 + B7 − B6 +A7 − C8 − C7 + K25 A6 + (E7 − E6) =

The above set of equations are used to compute how many non-volatilestorage elements are in each threshold voltage bin based on how manynon-volatile storage elements were determined to be in each data statefor different sets of read compare voltages. In the example of Table 1,there are thirty five bins. Therefore, there are thirty five equationsthat determine thirty five data points corresponding to number of memorycells in bins.

One example result of step 1312 of FIG. 13, including the result fromapplying the equations of Table 1 is depicted as curve 1820 in FIG. 18A.That is, the equations above yield curve 1820. The linear X axiscorresponds to threshold voltage and the logarithmic Y axis correspondsto the number of memory cells in each bin. Curve 1822 of FIG. 18A showsa smoothed version of curve 182. FIG. 18B depicts the derivative ofdistribution function 1822 with respect to threshold voltage. Points1830 and 1832 of FIG. 18B are two examples of zero crossings fromnegative values to positive values. In one embodiment, the zerocrossings are obtained by interpolation between pairs of neighborderivative data. More information about zero crossing are providedbelow.

Note that FIG. 18A and 18B show data for an example when the memorycells store four bits of data each; therefore, there are sixteen datastates. Most of the examples discussed above show the memory cellsstoring two bits of data each. However, the teachings of FIGS. 18A and18B apply memory cells storing one bit of data, two bits of data, threebits of data, four bits of data, etc.

FIG. 18C is a flow chart that describes an embodiment of a process forupdating read compare levels (step 1314 of FIG. 13). The process of FIG.18C may be performed after the threshold voltage distribution isdetermined in step 1312 of FIG. 13. In one embodiment, the thresholdvoltage distribution data is determined for all memory cells connectedto a single word line, all memory cells in a block, all memory cells inan array of memory cells, or another unit of memory cells. In oneexample, the input to the process of FIG. 18C is curve 1820. Other typesand forms of threshold voltage distribution data can also be used. Instep 1862, the threshold voltage distribution data is smoothed. Forexample, curve 1820 is smoothed to create curve 1822 of FIG. 18A. Anyone of many suitable known functions can be uses to smooth the thresholdvoltage distribution data by means of convolution or any otheroperations known in the art. For example, a low pass filter can be usedto smooth the data. Other examples of suitable functions includeGaussian functions, truncated Gaussian functions, skewed Gaussianfunctions, weighted moving averages, and square functions. In step 1864of FIG. 18C, the derivative of the smoothed data is determined. Forexample the graph of FIG. 18B is created. There are many ways and formsto create and store information about the derivative, with no oneparticular way or form required. In step 1866, the output of derivativecalculation is investigated to look for zero crossings. In oneembodiment, zero crossings of the derivative data from negativederivative data values transitioning to positive derivative data values,as word line voltage is increased, represent read compare points. Inother embodiments, the scale, form or range of the data could bedifferent and the process would look for other data landmarks (includingcrossing other thresholds) as an indication of the read compare points.In step 1868, the new read compare points found in step 1866 are used toreplace the old read compare points. In one embodiment, the new readcompare points are stored as parameters in registers/latches in thecontroller 244 or control circuitry 220 to be used immediately. Inanother embodiment, the new read compare points are stored as parametersin non-volatile memory for future use. The preferred type ofnon-volatile memory for such parameters storage is the binary type whichwould allow more updates as it is more immune to degradation due toprogram/erase cycles. However, any type of volatile or non-volatilememory for such parameters storage may be used. An alternative method ofobtaining new read compare voltage values from a threshold voltagedistribution is described in the following paragraph.

Consider curves 1820 or 1822 (FIG. 18A) with a linear voltage axis and amemory cell count axis in a logarithmic scale with base 10, though thelogarithmic base can be another number in principle. The maxima andminima of the function may be determined in a standard way withreference to a derivative function such as that depicted in FIG. 18B.Suppose further that for a minimum in question, there is a maximum oneither side of the minimum point (on the voltage axis). Then thedistance (along the log count axis) between the minimum and each maximumcan be divided into approximately even thirds, a processor in the systemperforming the requisite mathematical calculations to create thesedivisions. It is known that dividing a path between two points intothree segments requires two intermediate points. Thus, there are twopairs of intermediate points, one for each maximum. Each of these pairsof points, as per Euclidean geometry, can be used to construct a line,such that there are two lines, each between the minimum and one of themaxima. These lines may be represented as high-resolution tables ofcoordinate pairs in the system. The system can then perform furthermathematical operations to find an approximate intersection between thetwo lines, which are known to intersect between the maxima and near theminimum. The digital value nearest to this intersection point (andrepresentable by the system), once stored, can be used to generate thenew read compare voltage, perhaps by means of a Digital-to-AnalogConverter (DAC). The read compare voltages for the different states, asdetermined here or using other methods, may be differently separated[i.e. (Vrc−Vrb) may differ from (Vrb−Vra)], as the electron leakageconditions from the various memory cells and for the different datastates may require. The new read compare voltages that may replace theprevious read compare voltages may correspond to the voltages at thecenter of the bins as shown in the table describing FIG. 18.

The process of FIG. 18C can be completely performed on memory chip 212(e.g., at the direction of state machine 222) or it can be performed bya combination of memory chip 212 and controller 244. In oneimplementation, the controller issues a command to the state machine toupdate the read compare points. In another implementation, the statemachine determines when to update the read compare points. In oneexample, the controller requests the threshold voltage distribution datafrom the memory chip 212 and then the controller issues commands to thememory, receives data from memory that allows it to perform steps1862-1868. Other divisions of labor can also be used.

FIG. 19 is a flow chart describing a process for updating the readcompare points (e.g., Vra, Vrb and Vrc) periodically when the memorysystem has idle time or can otherwise perform the operation withoutmaterially affecting user perceived performance. The process of FIG. 19can be performed periodically or continuously. Whereas the process ofFIG. 13 may be executed when the system performs a read operation.

In step 1950 of FIG. 19, the state machine (or controller, or otherdevice) will determine whether the memory system is idle. If not, themethod of FIG. 19 is completed. If the memory system is idle, then atime stamp for the next set of read compare points is accessed. In oneembodiment, there is one set of read compare points for the entiresystem. In another embodiment, each block, word line or other unit ofdata will have its own set of read compare points and each set will haveits own time stamp. The first time that step 1952 is performed, a timestamp for any of the various sets of read compare points is accessed.Each subsequent iteration of step 1952 during a performance of theprocess of FIG. 19 will access another set of time stamps for anotherword line, block, etc. In one embodiment, multiple sets of read comparepoints can share a common time stamp.

In step 1954 of FIG. 19, the system will determine if the accessed timestamp indicates that the associated read compare points are older than apredetermined threshold (e.g., two weeks, two months, etc.). If so, thenthe system executes steps 1312 and 1314 from FIG. 13, in which the setof read compare points associated with the currently chosen time stampare updated after determining the threshold voltage distribution overthese memory cells, using the methods described above. If the accessedread compare points are not older than the predetermined threshold, thensteps 1312 and 1314 skipped. In step 1958, it is determined whetherthere are more sets of read compare levels. If there are more sets ofread compare levels that need to be considered, then the process loopsback to step 1952 and the next time stamp for the next set of readcompare levels is processed. If there are no more sets of read comparelevels that need to be considered in this performance of the method ofFIG. 19, then the method of FIG. 19 is completed.

One set of read compare points can be obtained per word line. The memorycells (or a subset of the memory cells) that reside on one word line canform one or more ECC pages. A portion (e.g. one quarter) of the memorycells that reside on the same word line may constitute a page. In oneembodiment, one set of read compare points per word line will beappropriate for all the pages on that word line. To save time, the sameset of read compare points obtained on one word line may be used on allother word lines in the same block. If information about the time of thelast update of the read compare points for a given page is notavailable, then the rate at which the read compare points are updated inthe background can be adjusted such that no word line's read comparepoints are updated more often than a predetermined amount of time evenif the memory system is continuously powered up and idle.

FIG. 19A is a flow chart describing one process to periodically adjustread compare voltages for nonvolatile memory elements. The process ofFIG. 19A may be employed to account for gradual change of state inmemory cells, which in some cases may be the result of electrons leakingfrom the floating gate. The process of FIG. 19A represents analternative to the process of FIG. 19 that adjusts read compare voltagesaccording to the number of times a block has been programmed, ratherthan according to a certain period of time that has passed. In step1972, which may be triggered every clock cycle on one or more of thesystem processors, the system will check whether or not the memory chiphas been recently activated. If not, and the memory has been “on” for acertain duration of time, then in step 1974, the system checks whetherthis duration has exceeded a threshold, which may be days or weeks ofsustained operation. In some embodiments, the threshold of time may befixed, while in others, periodic temperature readings may be used todynamically calculate this threshold, since heating may cause depletionof stored charge. If the duration of operation has not surpassed thisthreshold, the system will exit the process in step 1976.

However, if, in step 1972, the system determines that it has just turnedon, or, if in step 1974, the duration of operation has surpassed thethreshold used by the system, then in step 1978, the system adds 1 tothe session number of each programmed block. Here, session number refersto the number of sessions for which a block has been programmed, and asession is a period of time during which the memory circuit remainsoperational without turning off. Thus, for a block, the number ofsessions is 0 until it is programmed, after which it is changed to 1, 2,3, etc., as the memory system is used.

After step 1978, the system checks each block in step 1980 to determineif the block has been programmed for more than a certain number ofsessions, since after a certain number of sessions, the thresholdvoltages on the memory cells may drift due to various random processes.In step 1982, if, for a given block, the session number has exceeded acertain threshold, the system moves on to step 1984, in which, for thisblock, the system employs any of the aforementioned methods foradjusting the read compare voltage. If, after step 1982, no adjustmentis needed, or after step 1984 has completed for all blocks having beenprogrammed for a certain number of sessions, the system finishes theprocess in step 1976. In some embodiments, the session number is resetto 0 for any block having undergone read compare voltage adjustment instep 1984.

The above paragraphs explain a system and methods to determine thedistribution of threshold voltages among a set of nonvolatile memorycells and use the distribution data to determine new read comparevoltages while ensuring adequate separation between the possible datastates.

One embodiment comprises a method for operating a non-volatile storagedevice, comprising, for each set of read compare voltages of a pluralityof different sets of read compare voltages, performing multiple sensingoperations that each sense a different page of data from a population ofnon-volatile storage elements and determining threshold voltagedistributions for the population of non-volatile storage elements basedon the multiple sensing operations.

One embodiment comprises a non-volatile storage apparatus comprising apopulation of non-volatile storage elements and one or more managingcircuits in communication with the population of non-volatile storageelements, for each set of read compare voltages of a plurality ofdifferent sets of read compare voltages, the one or more managingcircuits perform multiple sensing operations that each sense a differentpage of data from a population of non-volatile storage elements, and theone or more managing circuits determine threshold voltage distributionsfor the population of non-volatile storage elements based on themultiple sensing operations.

One embodiment comprises a method for operating a non-volatile storagedevice, comprising performing multiple sensing operations for apopulation of non-volatile storage elements, the multiple sensingoperations comprise applying a read compare voltage to a selectednon-volatile storage element, applying a particular voltage to aneighbor of the selected non-volatile storage element based on a currentcondition of the neighbor while applying the read compare voltage to aselected non-volatile storage element and sensing a condition of theselected non-volatile storage element, and determining threshold voltagedistributions for the population of non-volatile storage elements basedon the multiple sensing operations.

One embodiment comprises a method for operating a non-volatile storagedevice, comprising determining threshold voltage distributions for apopulation of non-volatile storage elements by performing a first typeof read process using at least a first set of read compare voltages,determining a new set of read compare voltages for distinguishingbetween threshold voltage distributions based on the determinedthreshold voltage distributions, and reading data from the population ofnon-volatile storage elements by the first type of read process usingthe new set of read compare voltages.

The foregoing detailed description of the invention has been presentedfor purposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise form disclosed. Manymodifications and variations are possible in light of the aboveteaching. The described embodiments were chosen in order to best explainthe principles of the invention and its practical application, tothereby enable others skilled in the art to best utilize the inventionin various embodiments and with various modifications as are suited tothe particular use contemplated. It is intended that the scope of theinvention be defined by the claims appended hereto.

I claim:
 1. A method for operating a non-volatile storage device,comprising: for each set of read compare voltages of a plurality ofdifferent sets of read compare voltages, performing multiple sensingoperations that each sense a different page of data from a population ofnon-volatile storage elements; and determining threshold voltagedistributions for the population of non-volatile storage elements basedon the multiple sensing operations.
 2. The method of claim 1, furthercomprising: determining a new set of read compare voltages fordistinguishing between threshold voltage distributions based on thedetermined threshold voltage distributions.
 3. The method of claim 2,further comprising: reading data from the population of non-volatilestorage elements using the new set of read compare voltages.
 4. Themethod of claim 1, wherein: the non-volatile storage elements each storetwo bits of data such that each of the two bits of data are in differentpages; the threshold voltage distributions each correspond to one offour data states: a first data state, a second data state, a third datastate and a fourth data state; the first data state represents erasednon-volatile storage elements; the performing multiple sensingoperations includes performing a first page read and a second page read;the first page read includes sensing at one read compare level; and thesecond page read includes sensing at two read compare levels.
 5. Themethod of claim 4, wherein the determining threshold voltagedistributions comprises: for each set of read compare voltages of theplurality of different sets of read compare voltages, determining howmany non-volatile storage elements are in each data state based on thefirst page read and a second page read for the respective set of readcompare voltages.
 6. The method of claim 5, wherein the determining howmany non-volatile storage elements are in each data state comprises: forat least a subset of data states, performing a logical operation on bothbits of data for the non-volatile storage elements to determine resultswhich indicate whether respective non-volatile storage element are in astate being tested for; and counting the results for at least the subsetof data states.
 7. The method of claim 6, wherein the determiningthreshold voltage distributions further comprises: computing how manynon-volatile storage elements are in each threshold voltage bin based onhow many non-volatile storage elements were determined to be in eachdata state for different sets of read compare voltages.
 8. The method ofclaim 1, wherein the determining threshold voltage distributions furthercomprises: for each set of read compare voltages of the plurality ofdifferent sets of read compare voltages, determining how manynon-volatile storage elements are in each data state of a set of datastates that correspond to the threshold voltage distributions based onthe sensing operations; and computing how many non-volatile storageelements are in each threshold voltage bin based on how manynon-volatile storage elements were determined to be in each data statefor different sets of read compare voltages.
 9. The method of claim 1,wherein: multiple sensing operations each comprise applying a currentread compare voltage to a selected non-volatile storage element,applying a particular voltage to a neighbor of the selected non-volatilestorage element based on a current condition of the neighbor whileapplying the current read compare voltage to a selected non-volatilestorage element and sensing a condition of the selected non-volatilestorage element.
 10. A non-volatile storage apparatus, comprising: apopulation of non-volatile storage elements; and one or more managingcircuits in communication with the population of non-volatile storageelements; for each set of read compare voltages of a plurality ofdifferent sets of read compare voltages, the one or more managingcircuits perform multiple sensing operations that each sense a differentpage of data from a population of non-volatile storage elements; the oneor more managing circuits determine threshold voltage distributions forthe population of non-volatile storage elements based on the multiplesensing operations.
 11. The non-volatile storage apparatus of claim 10,wherein: the one or more managing circuits determine a new set of readcompare voltages for distinguishing between threshold voltagedistributions based on the determined threshold voltage distributionsand read data from the population of non-volatile storage elements usingthe new set of read compare voltages.
 12. The non-volatile storageapparatus of claim 10, wherein: for each set of read compare voltages ofthe plurality of different sets of read compare voltages, the one ormore managing circuits determine how many non-volatile storage elementsare in each data state of a set of data states that correspond to thethreshold voltage distributions based on the multiple sensingoperations.
 13. The non-volatile storage apparatus of claim 12, wherein:the one or more managing circuits determine how many non-volatilestorage elements are in each data state by, for at least a subset ofdata states, performing a logical operation on multiple bits of data forthe non-volatile storage elements to determine results which indicatewhether respective non-volatile storage elements are in a state beingtested for and counting the results for at least the subset of datastates.
 14. The non-volatile storage apparatus of claim 13, wherein: theone or more managing circuits determine threshold voltage distributionsfor the population of non-volatile storage elements by computing howmany non-volatile storage elements are in each threshold voltage binbased on how many non-volatile storage elements were determined to be ineach data state for different sets of read compare voltages.
 15. Thenon-volatile storage of claim 10, wherein: the population ofnon-volatile storage elements are flash memory cells connected to acommon word line.
 16. A method for operating a non-volatile storagedevice, comprising: performing multiple sensing operations for apopulation of non-volatile storage elements, the multiple sensingoperations comprise applying a read compare voltage to a selectednon-volatile storage element, applying a particular voltage to aneighbor of the selected non-volatile storage element based on a currentcondition of the neighbor while applying the read compare voltage to aselected non-volatile storage element and sensing a condition of theselected non-volatile storage element; and determining threshold voltagedistributions for the population of non-volatile storage elements basedon the multiple sensing operations.
 17. The method of claim 16, furthercomprising: determining a new set of read compare voltages fordistinguishing between threshold voltage distributions based on thedetermined threshold voltage distributions; and reading data from thepopulation of non-volatile storage elements using the new set of readcompare voltages.
 18. The method of claim 16, wherein the determiningthreshold voltage distributions further comprises: for each set of readcompare voltages of a plurality of different sets of read comparevoltages, determining how many non-volatile storage elements are in eachdata state of a set of data states that correspond to the thresholdvoltage distributions based on the sensing operations; and computing howmany non-volatile storage elements are in each threshold voltage binbased on how many non-volatile storage elements were determined to be ineach data state for different sets of read compare voltages.
 19. Amethod for operating a non-volatile storage device, comprising:determining threshold voltage distributions for a population ofnon-volatile storage elements by performing a first type of read processusing at least a first set of read compare voltages; determining a newset of read compare voltages for distinguishing between thresholdvoltage distributions based on the determined threshold voltagedistributions; and reading data from the population of non-volatilestorage elements by the first type of read process using the new set ofread compare voltages.
 20. The method of claim 19, wherein: the firsttype of read process comprise applying a current read compare voltage toa selected non-volatile storage element, applying a particular voltageto a neighbor of the selected non-volatile storage element based on acurrent condition of the neighbor while applying the current readcompare voltage to a selected non-volatile storage element and sensing acondition of the selected non-volatile storage element.